:host {
  --ti-image-preview-icon-width: var(--ti-common-size-6x);
  --ti-image-preview-container-margin: var(--ti-common-space-5x);
}

.ti3-image-preview-modal-header {
  padding: var(--ti-common-space-3x) var(--ti-common-space-5x) !important;
  font-size: var(--ti-common-font-size-1) !important;
  font-weight: var(--ti-common-font-weight-4);
  line-height: 20px;
}
.ti3-image-preview-modal-body {
  margin: 0 var(--ti-image-preview-container-margin) !important;
  max-height: none !important;
  // 因为弹窗的纵向滚动条需要完全靠右（issue #1902），但弹窗内容与边框也有间距，所以将弹窗的margin改为了padding
  // 而预览图片时，不需要额外的间距，所以将padding设置为0。
  padding: 0;
}

.ti3-image-preview-container {
  margin: 0 auto var(--ti-image-preview-container-margin);
  img {
    display: inline-block;
    width: 100%;
    border-style: none;
  }
}
.ti3-image-preview-icon-container {
  position: absolute;
  width: 100%;
  .ti3-image-preview-icon {
    display: inline-block;
    width: var(--ti-image-preview-icon-width);
    height: calc(var(--ti-image-preview-icon-width) * 2);
    line-height: calc(var(--ti-image-preview-icon-width) * 2);
    background: rgba(0, 0, 0, 0.2);
    font-size: var(--ti-image-preview-icon-width);
    color: #ffffff;
    cursor: pointer;
    border-radius: 2px;
    &:hover,
    &:focus {
      background: rgba(0, 0, 0, 0.3);
    }
  }
  .ti3-image-preview-icon-disabled {
    background: rgba(0, 0, 0, 0.2) !important;
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    outline: none;
  }
  .ti3-image-preview-icon-left {
    float: left;
  }
  .ti3-image-preview-icon-right {
    float: right;
  }
}
